About 1304 letters

About 7 minutes

#HTML <output>

The <output> HTML element is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.

#Attributes

  • for: A space-separated list of other elements' ids, indicating that those elements contributed input values to (or otherwise affected) the calculation.

  • form: The <form> element to associate the output with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <output> is associated with its ancestor <form> element, if any.)

    This attribute lets you associate <output> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element. The <output> element's name and content are not submitted when the form is submitted.

  • name: The element's name. Used in the form.elements API.

Created in 6/9/2025

Updated in 6/9/2025